@model string
@using NITASA.ViewModels
@{
    CL_WidgetOption wOption = NITASA.Helpers.Functions.ParseJson<CL_WidgetOption>(Model);
    List<NITASA.ViewModels.CL_Content> pages = NITASA.Helpers.Functions.GetPages(wOption.Count);
}

@if (pages.Count() > 0)
{
    <div class="cleaner_h40"></div>
    <h4>@wOption.Title</h4>
    <ul class="templatemo_list">
        @foreach (var item in pages)
        {
            <li><a href="@(string.IsNullOrEmpty(item.URL) ? "#" : "/Content/" + item.URL)">@item.Title</a></li>
        }
    </ul>
}